﻿using System;
using System.Collections.Generic;
using mscook.core;
using mscook.core.domain;
using mscook.core.repositories;
namespace mscook.core.services
{
    public class HotelService : IHotelService
    {
        private IHotelRepository iHotelRepository;

        public HotelService(IHotelRepository iHotelRepository)
        {
            this.iHotelRepository = iHotelRepository;
        }

        public Hotel Get(string id)
        {
            return iHotelRepository.Get(id);
        }

        public IList<Hotel> SelectPageList(int start, int limit, out long total)
        {
            return iHotelRepository.SelectPageList(start, limit, out total);
        }

        public bool Delete(string id)
        {
            return iHotelRepository.Delete(id);
        }

        public void SaveOrUpdate(Hotel Hotel)
        {
            iHotelRepository.SaveOrUpdate(Hotel);
        }

        public IList<Hotel> SelectAll()
        {
            return iHotelRepository.GetAll();
        }
        public IList<Hotel> SelectLimitbyIds(IList<string> resourceIds, int start, int limit, out long total)
        {
            return iHotelRepository.GetLimitByIds(resourceIds, start, limit, out total);
        }

        public IList<Hotel> GetLimitPartner(int start, int limit)
        {
            return iHotelRepository.GetLimitPartner(start, limit);
        }

        public IList<Hotel> SelectPageList(int start, int limit, out long total, string hotelName)
        {
            return iHotelRepository.SelectPageList(start, limit, out total, hotelName);
        }
        public IList<Hotel> SelectPageListByExpressions(int start, int limit, out long total, System.Linq.Expressions.Expression<Func<Hotel, bool>> expression)
        {
            return iHotelRepository.SelectPageList(start,limit,out total,expression);
        }
       public IList<Hotel> SelectBottomHotelList(int size)
        {
            return iHotelRepository.SelectBottomHotelList(size);     
        }

   
    }
}
